import request from '@/utils/request';

export const getCategoryList = (data: any) => {
    return request({
        url: `business/category/list`,
        data,
        method: 'post'
    });
};
export const saveCategory = (data: any) => {
    return request({
        url: `business/category/save`,
        data,
        method: 'post'
    });
};
export const getCategoryById = (id: number) => {
    return request({
        url: `business/category/${id}`,
        method: 'get'
    });
};
export const deleteCategoryById = (id: number) => {
    return request({
        url: `business/category/delete/${id}`,
        method: 'get'
    });
};

export const checkCategoryName = (data: any) => {
    return request({
        url: `business/category/checkCategoryName`,
        method: 'post',
        data
    });
};